TOPC Cohort 3 Analysis

Post-test

Author

Elham Ali

Published

December 11, 2023

Graphs for post-test survey analysis for city governments.

Install necessary packages

Code
# Set a CRAN mirror
options(repos = c(CRAN = "https://cloud.r-project.org"))

# Install necessary packages
# install.packages("magrittr")
# install.packages("dplyr")
# install.packages("ggplot2")
# install.packages("knitr")
# install.packages("kableExtra")
# install.packages("survey")
# install.packages("plotly")

# Load the packages
library(magrittr)
library(dplyr)
library(plotly)
library(ggplot2)
library(knitr)
library(kableExtra)
library(survey)

Survey design weights

Code
# Read the data from the CSV file
cohort3FinalGov3 <- read.csv("~/Documents/R_Projects/TOPC-impact-evaluation-dashboard/Cohort_3/cohort3FinalGov3.csv") 

# Define population and sample sizes
population_counts <- c(Akron = 8, Detroit = 9, Macon = 10, Miami = 13)
sample_counts <- c(Akron = 4, Detroit = 2, Macon = 4, Miami = 3)

# Total population and sample size
total_population <- sum(population_counts)
total_sample <- sum(sample_counts)

# Calculate the weights
weights <- (population_counts / total_population) / (sample_counts / total_sample)

# Print the calculated weights
print(weights)
   Akron  Detroit    Macon    Miami 
0.650000 1.462500 0.812500 1.408333 
Code
# Convert Likert scale questions to numeric
likert_questions <- c("q4", "q5", "q6", "q7", "q9", "q10", "q11", "q12", "q13", "q14", "q15", "q16", "q17", "q20", "q21")
for (question in likert_questions) {
    cohort3FinalGov3[[question]] <- as.numeric(as.character(cohort3FinalGov3[[question]]))
}

# Map between city names 
city_map <- list(
  "Miami-Dade County, FL" = "Miami",
  "Akron, OH" = "Akron",
  "Detroit, MI" = "Detroit",
  "Macon-Bibb County, GA" = "Macon"
)

# Update dataframe to use the mapped names
cohort3FinalGov3$city_mapped <- unlist(lapply(cohort3FinalGov3$q3, function(x) city_map[[x]]))

# Assign weights using the mapped city names
cohort3FinalGov3$weights <- weights[cohort3FinalGov3$city_mapped]

# Define the survey design
design <- svydesign(ids = ~1, 
                    strata = ~city_mapped, 
                    weights = ~weights, 
                    data = cohort3FinalGov3)

Given this in the data:

Table 1. Count of population and sample participants in city governments in the TOPC program in Cohort 3
City Teams Population Count Sample Count
Akron 8 4
Detroit 9 2
Macon 10 4
Miami 13 3
Total 40 13

The formula I used to align proportions of population to proportions of sample)

\(\text{Weight of strata} = \frac{\frac{\text{Strata Population}}{\text{Total Population}}}{\frac{\text{Strata Sample}}{\text{Total Sample}}}\)

\(\text{Weight for Akron} = \frac{\frac{8}{40}}{\frac{4}{14}} = \frac{0.2}{0.2857} \approx 0.700\)

\(\text{Weight for Detroit} = \frac{\frac{9}{40}}{\frac{2}{14}} = \frac{0.225}{0.1429} \approx 1.575\)

\(\text{Weight for Macon} = \frac{\frac{10}{40}}{\frac{4}{14}} = \frac{0.25}{0.2857} \approx 0.875\)

\(\text{Weight for Miami} = \frac{\frac{13}{40}}{\frac{3}{14}} = \frac{0.325}{0.2143} \approx 1.517\)

Descriptive data analysis

For Q4

Please note that the absence of confidence intervals and standard errors for the median in the strata of Akron, Detroit, and Miami could be due to the svyquantile function not being able to compute these values with the available data. This is typically due to small sample sizes or other limitations in the data. The confidence interval for Macon, being precise, might suggest limited responses or a lack of variation in the responses for that stratum.

  • Akron

    • Median: The median response is 3, which means the central tendency of the responses is “Agree”.

    • Standard Deviation: The standard deviation is approximately 0.50. This value indicates moderate variability in the responses, suggesting that while “Agree” is the median response, there is some dispersion around this central value.

  • Detroit

    • Median: The median response is 3, similar to Akron, indicating “Agree” as the central response.

    • Standard Deviation: The standard deviation is approximately 0.71, which suggests a slightly higher variability in responses compared to Akron.

  • Macon

    • Median: The median response is 3 with a confidence interval from 3 to 3, which indicates a very consistent agreement among the participants, as the central response is “Agree” with little to no variability.

    • Standard Deviation: The standard deviation is 0, which means there is no variability among the responses, and all respondents provided the same answer.

  • Miami

    • Median: The median response is also 3, indicating “Agree” as the central response.

    • Standard Deviation: The standard deviation is approximately 0.58, suggesting a moderate level of variability, similar to Akron.

Code
# Define the strata
strata <- c("Akron", "Detroit", "Macon", "Miami")

# Initialize a data frame to store the results for question q4
results_df <- data.frame(
    Stratum = character(),
    Median = numeric(),
    StandardDeviation = numeric(),
    stringsAsFactors = FALSE
)

# Calculate stats for question q4 across each stratum
for (stratum in strata) {
    stratum_design <- subset(design, city_mapped == stratum)
    median_val <- svyquantile(~q4, stratum_design, 0.5, na.rm = TRUE)
    sd_val <- sqrt(svyvar(~q4, stratum_design, na.rm = TRUE))

    # Extract the median and standard deviation values
    median_q4 <- median_val[1]  # Extracting the median value for q4
    sd_q4 <- sd_val[1]  # Extracting the SD value for q4

    # Append the results to the data frame
    results_df <- rbind(results_df, data.frame(
        Stratum = stratum,
        Median = median_q4,
        StandardDeviation = sd_q4
    ))
}

# Print the results for q4
print(results_df)
     Stratum Median.q4.quantile Median.q4.ci.2.5 Median.q4.ci.97.5 Median.q4.se
0.5    Akron                  3              NaN               NaN          NaN
0.51 Detroit                  3              NaN               NaN          NaN
0.52   Macon                  3                3                 3            0
0.53   Miami                  3              NaN               NaN          NaN
     StandardDeviation
0.5          0.5000000
0.51         0.7071068
0.52         0.0000000
0.53         0.5773503
Code
# Define the strata and questions
strata <- c("Akron", "Detroit", "Macon", "Miami")
questions <- c("q4", "q5", "q6", "q7", "q9", "q10", "q11", "q12", "q13", "q14", "q15", "q16", "q17", "q20", "q21")

# Initialize a data frame to store the results
results_df <- data.frame(
    Question = character(),
    Stratum = character(),
    Median = numeric(),
    StandardDeviation = numeric(),
    stringsAsFactors = FALSE
)

# Calculate stats for each question across each stratum
for (question in questions) {
    for (stratum in strata) {
        # Create the design for the current stratum
        stratum_design <- subset(design, city_mapped == stratum)

        # Compute the median and standard deviation for the current question
        median_val <- svyquantile(~get(question), stratum_design, 0.5, na.rm = TRUE)
        sd_val <- sqrt(svyvar(~get(question), stratum_design, na.rm = TRUE))
        
        # Extract the median and standard deviation values
        median_question <- median_val[1]  # Extracting the median value for the question
        sd_question <- sd_val[1]  # Extracting the SD value for the question
        
        # Append the results to the data frame
        results_df <- rbind(results_df, data.frame(
            Question = question,
            Stratum = stratum,
            Median = median_question,
            StandardDeviation = sd_question
        ))
    }
}

# Print the results
# print(results_df)

library(knitr)

kable(results_df, caption = "Post-test Survey Results by City and Question", 
      align = 'c', format = "html")
Post-test Survey Results by City and Question
Question Stratum Median.get.question..quantile Median.get.question..ci.2.5 Median.get.question..ci.97.5 Median.get.question..se StandardDeviation
0.5 q4 Akron 3 NaN NaN NaN 0.5000000
0.51 q4 Detroit 3 NaN NaN NaN 0.7071068
0.52 q4 Macon 3 3 3 0 0.0000000
0.53 q4 Miami 3 NaN NaN NaN 0.5773503
0.54 q5 Akron 3 NaN NaN NaN 0.5773503
0.55 q5 Detroit 3 3 3 0 0.0000000
0.56 q5 Macon 3 NaN NaN NaN 0.5000000
0.57 q5 Miami 3 NaN NaN NaN 0.5773503
0.58 q6 Akron 3 NaN NaN NaN 0.5773503
0.59 q6 Detroit 3 3 3 0 0.0000000
0.510 q6 Macon 3 NaN NaN NaN 0.5000000
0.511 q6 Miami 4 4 4 0 0.5773503
0.512 q7 Akron 3 NaN NaN NaN 0.5773503
0.513 q7 Detroit 3 3 3 0 0.0000000
0.514 q7 Macon 3 NaN NaN NaN 0.9574271
0.515 q7 Miami 4 4 4 0 0.5773503
0.516 q9 Akron 3 NaN NaN NaN 0.5000000
0.517 q9 Detroit 3 3 3 0 0.0000000
0.518 q9 Macon 3 NaN NaN NaN 0.5000000
0.519 q9 Miami 3 NaN NaN NaN 0.5773503
0.520 q10 Akron 3 NaN NaN NaN 0.5000000
0.521 q10 Detroit 3 NaN NaN NaN 0.7071068
0.522 q10 Macon 3 NaN NaN NaN 0.5000000
0.523 q10 Miami 3 NaN NaN NaN 0.5773503
0.524 q11 Akron 3 3 3 0 0.0000000
0.525 q11 Detroit 3 NaN NaN NaN 0.7071068
0.526 q11 Macon 3 NaN NaN NaN 0.5000000
0.527 q11 Miami 4 4 4 0 0.5773503
0.528 q12 Akron 3 NaN NaN NaN 0.5000000
0.529 q12 Detroit 2 NaN NaN NaN 1.4142136
0.530 q12 Macon 3 3 3 0 0.5000000
0.531 q12 Miami 3 NaN NaN NaN 0.5773503
0.532 q13 Akron 3 3 3 0 0.0000000
0.533 q13 Detroit 2 NaN NaN NaN 0.7071068
0.534 q13 Macon 3 NaN NaN NaN 0.5000000
0.535 q13 Miami 3 NaN NaN NaN 0.5773503
0.536 q14 Akron 3 NaN NaN NaN 0.5000000
0.537 q14 Detroit 2 NaN NaN NaN 0.7071068
0.538 q14 Macon 3 NaN NaN NaN 0.5000000
0.539 q14 Miami 3 NaN NaN NaN 0.5773503
0.540 q15 Akron 4 4 4 0 0.5000000
0.541 q15 Detroit 3 3 3 0 0.0000000
0.542 q15 Macon 3 NaN NaN NaN 0.5773503
0.543 q15 Miami 3 NaN NaN NaN 1.0000000
0.544 q16 Akron 3 NaN NaN NaN 0.5000000
0.545 q16 Detroit 3 3 3 0 0.0000000
0.546 q16 Macon 3 NaN NaN NaN 0.9574271
0.547 q16 Miami 3 3 3 0 0.5773503
0.548 q17 Akron 3 3 3 0 0.0000000
0.549 q17 Detroit 2 NaN NaN NaN 0.7071068
0.550 q17 Macon 3 NaN NaN NaN 0.5773503
0.551 q17 Miami 3 NaN NaN NaN 0.5773503
0.552 q20 Akron 3 3 3 0 0.5000000
0.553 q20 Detroit 3 3 3 0 0.0000000
0.554 q20 Macon 3 NaN NaN NaN 0.5000000
0.555 q20 Miami 3 NaN NaN NaN 0.5773503
0.556 q21 Akron 4 4 4 0 0.5000000
0.557 q21 Detroit 3 3 3 0 0.0000000
0.558 q21 Macon 3 NaN NaN NaN 0.5773503
0.559 q21 Miami 4 4 4 0 0.5773503

Participant Background

Q3. Which city/county are you representing?

Code
# Single-variable frequency plot
q3_frequency <- svytable(~q3, design = design)

ggplot(as.data.frame(q3_frequency), aes(x = q3, y = Freq)) +
  geom_bar(stat = "identity", fill = "#041e42", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) + 
  labs(title = "All city governments participated in the survey with the 
highest number of respondents from Miami-Dade and 
Macon-Bibb Counties.",
       subtitle = paste("Total number of survey respondents per city team (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses") +
  theme_minimal() + 
  theme(legend.position = "bottom",
        legend.box = "vertical",
        legend.box.margin = margin(0, 0, 0, 0),
        legend.title = element_blank(),
        panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0)) +
  guides(fill = guide_legend(nrow = 1, byrow = TRUE))

Q25. Which title best describes your role and level of seniority at work?

Code
# Single-variable frequency plot
q25_frequency <- svytable(~q25, design = design)

ggplot(as.data.frame(q25_frequency), aes(x = q25, y = Freq)) +
  geom_bar(stat = "identity", fill = "#041e42", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) + 
  labs(title = "Majority of respondents are senior officials or 
managers.",
       subtitle = paste("Total number of survey respondents (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses") +
  theme_minimal() + 
  theme(legend.position = "bottom",
        legend.box = "vertical",
        legend.box.margin = margin(0, 0, 0, 0),
        legend.title = element_blank(),
        panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0)) +
  guides(fill = guide_legend(nrow = 1, byrow = TRUE))

Code
# # Cross-tabulation with cities
# colors <- c("#041e42", "#6eaddc", "#da291c", "#1B786E", "#e69138", "#5b9bd5", "#a4c739")
# 
# q25_cross_tab_city <- svytable(~q25 + city_mapped, design = design)
# 
# ggplot(as.data.frame(q25_cross_tab_city), aes(x = city_mapped, y = Freq, fill = q25)) +
#   geom_bar(stat = "identity", position = "stack") +
#   coord_flip() +
#   scale_fill_manual(values = colors) +  # Assign the colors to the categories
#   labs(title = "Distribution of Q25 Responses Across Cities",
#        subtitle = paste("Responses for Q25 (n =", total_sample, ")"),
#        x = "",
#        y = "Number of Responses",
#        caption = "Source: TOPC Cohort 3 Survey (2023)") +
#   theme_minimal() +
#   theme(legend.position = "bottom",
#         legend.box = "vertical",
#         legend.box.margin = margin(0, 0, 0, 0),
#         legend.title = element_blank(),
#         panel.grid.major.y = element_blank(),
#         panel.grid.minor.y = element_blank(),
#         plot.title = element_text(face = "bold"),
#         plot.caption = element_text(hjust = 0)) +
#   guides(fill = guide_legend(nrow = 1, byrow = TRUE))

Q27. How many years have you worked at your respective City or County?

Code
# Single-variable frequency plot
q27_frequency <- svytable(~q27, design = design)

ggplot(as.data.frame(q27_frequency), aes(x = q27, y = Freq)) +
  geom_bar(stat = "identity", fill = "#041e42", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) + 
  labs(title = "Majority are new to working in their city or county governments.",
       subtitle = paste("Total number of survey respondents (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses") +
  theme_minimal() + 
  theme(legend.position = "bottom",
        legend.box = "vertical",
        legend.box.margin = margin(0, 0, 0, 0),
        legend.title = element_blank(),
        panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0)) +
  guides(fill = guide_legend(nrow = 1, byrow = TRUE))

Code
# Cross-tabulation with cities
q27_cross_tab_city <- svytable(~q27 + city_mapped, design = design)

ggplot(as.data.frame(q27_cross_tab_city), aes(x = city_mapped, y = Freq, fill = q27)) +
  geom_bar(stat = "identity", position = "stack", width = 0.7) +
  coord_flip() +
  scale_fill_manual(values = c("#041e42","#6eaddc","#da291c","#1B786E"),
                    limits = c("0-2 years", "3-5 years", "6-9 years", "10+ years")) + 
  labs(title = "Majority are new to working to city and county governments, 
especially in Macon and Detroit.",
       subtitle = paste("Years of Experience: Range from 0 to 10+ years (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses",
       caption = "Source: TOPC Cohort 3 Survey (2023)") +
  theme_minimal() +
  theme(legend.position = "bottom",
        legend.box = "vertical",
        legend.box.margin = margin(0, 0, 0, 0),
        legend.title = element_blank(),
        panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0)) +
  guides(fill = guide_legend(nrow = 1, byrow = TRUE))

Q28. Please describe your racial/ethnic identity. Select all that apply.

Code
# Single-variable frequency plot
q28_frequency <- svytable(~q28, design = design)

ggplot(as.data.frame(q28_frequency), aes(x = q28, y = Freq)) +
  geom_bar(stat = "identity", fill = "#041e42", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) + 
  labs(title = "Majority are new to working in their city or county governments.",
       subtitle = paste("Total number of survey respondents (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses") +
  theme_minimal() + 
  theme(legend.position = "bottom",
        legend.box = "vertical",
        legend.box.margin = margin(0, 0, 0, 0),
        legend.title = element_blank(),
        panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0)) +
  guides(fill = guide_legend(nrow = 1, byrow = TRUE))

Q29. Which gender do you most closely identify with (or self-describe in ‘other’)?

Code
# Single-variable frequency plot
q29_frequency <- svytable(~q29, design = design)

ggplot(as.data.frame(q29_frequency), aes(x = q29, y = Freq)) +
  geom_bar(stat = "identity", fill = "#041e42", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) + 
  labs(title = "More than half of respondents identify as male.",
       subtitle = paste("Total number of survey respondents (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses") +
  theme_minimal() + 
  theme(legend.position = "bottom",
        legend.box = "vertical",
        legend.box.margin = margin(0, 0, 0, 0),
        legend.title = element_blank(),
        panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0)) +
  guides(fill = guide_legend(nrow = 1, byrow = TRUE))

Code
# Compare weighted vs. unweighted counts:
# # Unweighted count
# unweighted_counts <- table(cohort3FinalGov3$q3)
# 
# # Weighted count
# weighted_counts <- svytable(~q3, design = design)
# 
# # Compare
# print(unweighted_counts)
# print(weighted_counts)
Code
# Review weighted summary statistics:
# # Weighted mean
# weighted_mean <- svymean(~q3, design = design)
# 
# # Weighted total
# weighted_total <- svytotal(~q3, design = design)
# 
# # Display the results
# print(weighted_mean)
# print(weighted_total)

Goal 1: Participant Awareness and Knowledge

Q4. I learned new skills in community research practices, such as leading interviews and conducting surveys, during this program.

Code
# Single-variable frequency plot
q4_frequency <- svytable(~q4, design = design)

all_levels_df <- data.frame(q4 = factor(1:4, levels = 1:4), Freq = integer(4))

q4_frequency_df <- merge(all_levels_df, as.data.frame(q4_frequency), by = "q4", all.x = TRUE)
q4_frequency_df$Freq <- rowSums(q4_frequency_df[, c("Freq.x", "Freq.y")], na.rm = TRUE)

q4_post_frequency_plot <- ggplot(q4_frequency_df, aes(x = q4, y = Freq)) +
  geom_bar(stat = "identity", fill = "#041e42", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) + 
  labs(title = "All respondents agree they learned new skills in community 
research practices.",
       subtitle = paste("Rating Scale: 4 - Strongly Agree to 1 - Strongly Disagree (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses",
       caption = "Source: TOPC Cohort 3 Survey (2023)") +
  theme_minimal() + 
  theme(panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0))

print(q4_post_frequency_plot)

Code
ggsave("plots/q4_post_frequency_plot.png", q4_post_frequency_plot)

# Cross-tabulation with cities
q4_cross_tab_city <- svytable(~q4 + city_mapped, design = design)

q4_levels_ordered <- as.factor(as.data.frame(q4_cross_tab_city)$q4)
q4_levels_ordered <- factor(q4_levels_ordered, levels = c("1", "2", "3", "4"))

q4_cross_tab_city_df <- as.data.frame(q4_cross_tab_city)
q4_cross_tab_city_df$q4 <- factor(q4_cross_tab_city_df$q4, levels = c("1", "2", "3", "4"))

q4_post_cross_tab_city_plot <- ggplot(q4_cross_tab_city_df, aes(x = city_mapped, y = Freq, fill = q4)) +
  geom_bar(stat = "identity", position = "stack", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) +
  scale_fill_manual(values = c("4" = "#041e42", "3" = "#6eaddc", "2" = "#da291c", "1" = "#1B786E"),
          drop=FALSE) +  
  labs(title = "Q4. I learned new skills in community research practices, such as 
leading interviews and conducting surveys, during this program.",
       subtitle = paste("Rating Scale: 4 - Strongly Agree to 1 - Strongly Disagree (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses",
       caption = "Source: TOPC Cohort 3 Survey (2023)") +
  theme_minimal() +
  theme(legend.position = "bottom",
        legend.title = element_blank(),
        panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0)) +
  guides(fill = guide_legend(reverse = TRUE, nrow = 1, byrow = TRUE))

print(q4_post_cross_tab_city_plot)

Code
ggsave("plots/q4_post_cross_tab_city_plot.png", q4_post_cross_tab_city_plot)
Code
# Define the strata
strata <- c("Akron", "Detroit", "Macon", "Miami")

# Initialize a data frame to store the results for question q4
results_df <- data.frame(
    Stratum = character(),
    Median = numeric(),
    StandardDeviation = numeric(),
    stringsAsFactors = FALSE
)

# Calculate stats for question q4 across each stratum
for (stratum in strata) {
    stratum_design <- subset(design, city_mapped == stratum)
    median_val <- svyquantile(~q4, stratum_design, 0.5, na.rm = TRUE)
    sd_val <- sqrt(svyvar(~q4, stratum_design, na.rm = TRUE))
    median_q4 <- median_val[1] 
    sd_q4 <- sd_val[1] 
    
    results_df <- rbind(results_df, data.frame(
        Stratum = stratum,
        Median = median_q4,
        StandardDeviation = sd_q4
    ))
}

# Print the results for q4
print(results_df)
     Stratum Median.q4.quantile Median.q4.ci.2.5 Median.q4.ci.97.5 Median.q4.se
0.5    Akron                  3              NaN               NaN          NaN
0.51 Detroit                  3              NaN               NaN          NaN
0.52   Macon                  3                3                 3            0
0.53   Miami                  3              NaN               NaN          NaN
     StandardDeviation
0.5          0.5000000
0.51         0.7071068
0.52         0.0000000
0.53         0.5773503

Q5. I learned skills to promote equity and foster inclusive spaces in my work.

Code
# Single-variable frequency plot
q5_frequency <- svytable(~q5, design = design)

all_levels_df <- data.frame(q5 = factor(1:4, levels = 1:4), Freq = integer(4))

q5_frequency_df <- merge(all_levels_df, as.data.frame(q5_frequency), by = "q5", all.x = TRUE)
q5_frequency_df$Freq <- rowSums(q5_frequency_df[, c("Freq.x", "Freq.y")], na.rm = TRUE)

q5_post_frequency_plot <- ggplot(q5_frequency_df, aes(x = q5, y = Freq)) +
  geom_bar(stat = "identity", fill = "#041e42", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) + 
  labs(title = "All respondents agree they learned new skills to promote
equity and inclusion in their work.",
       subtitle = paste("Rating Scale: 4 - Strongly Agree to 1 - Strongly Disagree (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses",
       caption = "Source: TOPC Cohort 3 Survey (2023)") +
  theme_minimal() + 
  theme(panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0))

print(q5_post_frequency_plot)

Code
ggsave("plots/q5_post_frequency_plot.png", q5_post_frequency_plot)

# Cross-tabulation with cities
q5_cross_tab_city <- svytable(~q5 + city_mapped, design = design)

q5_levels_ordered <- as.factor(as.data.frame(q5_cross_tab_city)$q5)
q5_levels_ordered <- factor(q5_levels_ordered, levels = c("1", "2", "3", "4"))

q5_cross_tab_city_df <- as.data.frame(q5_cross_tab_city)
q5_cross_tab_city_df$q5 <- factor(q5_cross_tab_city_df$q5, levels = c("1", "2", "3", "4"))

q5_post_cross_tab_city_plot <- ggplot(q5_cross_tab_city_df, aes(x = city_mapped, y = Freq, fill = q5)) +
  geom_bar(stat = "identity", position = "stack", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) +
  scale_fill_manual(values = c("4" = "#041e42", "3" = "#6eaddc", "2" = "#da291c", "1" = "#1B786E"),
          drop=FALSE) +   
  labs(title = "Majority agree that they learned equity and inclusion skills, and
some strongly agreeing, particularly in Miami and Macon.",
       subtitle = paste("Rating Scale: 4 - Strongly Agree to 1 - Strongly Disagree (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses",
       caption = "Source: TOPC Cohort 3 Survey (2023)") +
  theme_minimal() +
  theme(legend.position = "bottom",
        legend.title = element_blank(),
        panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0)) +
  guides(fill = guide_legend(reverse = TRUE, nrow = 1, byrow = TRUE))

print(q5_post_cross_tab_city_plot)

Code
ggsave("plots/q5_post_cross_tab_city_plot.png", q5_post_cross_tab_city_plot)

Q6. I learned new skills in applying user testing feedback to shape the development of our solution.

Code
# Single-variable frequency plot
q6_frequency <- svytable(~q6, design = design)

all_levels_df <- data.frame(q6 = factor(1:4, levels = 1:4), Freq = integer(4))

q6_frequency_df <- merge(all_levels_df, as.data.frame(q6_frequency), by = "q6", all.x = TRUE)
q6_frequency_df$Freq <- rowSums(q6_frequency_df[, c("Freq.x", "Freq.y")], na.rm = TRUE)

q6_post_frequency_plot <- ggplot(q6_frequency_df, aes(x = q6, y = Freq)) +
  geom_bar(stat = "identity", fill = "#041e42", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) + 
  labs(title = "Q6. I learned new skills in applying user testing feedback to shape 
the development of our solution.",
       subtitle = paste("Rating Scale: 4 - Strongly Agree to 1 - Strongly Disagree (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses",
       caption = "Source: TOPC Cohort 3 Survey (2023)") +
  theme_minimal() + 
  theme(panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0))

print(q6_post_frequency_plot)

Code
ggsave("plots/q6_post_frequency_plot.png", q6_post_frequency_plot)

# Cross-tabulation with cities
q6_cross_tab_city <- svytable(~q6 + city_mapped, design = design)

q6_cross_tab_city <- svytable(~q6 + city_mapped, design = design)

q6_levels_ordered <- as.factor(as.data.frame(q6_cross_tab_city)$q6)
q6_levels_ordered <- factor(q6_levels_ordered, levels = c("1", "2", "3", "4"))

q6_cross_tab_city_df <- as.data.frame(q6_cross_tab_city)
q6_cross_tab_city_df$q6 <- factor(q6_cross_tab_city_df$q6, levels = c("1", "2", "3", "4"))

q6_post_cross_tab_city_plot <- ggplot(q6_cross_tab_city_df, aes(x = city_mapped, y = Freq, fill = q6)) +
  geom_bar(stat = "identity", position = "stack", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) +
  scale_fill_manual(values = c("4" = "#041e42", "3" = "#6eaddc", "2" = "#da291c", "1" = "#1B786E"),
          drop=FALSE) +  
  labs(title = "Q6. I learned new skills in applying user testing feedback to shape the development of our solution.",
       subtitle = paste("Rating Scale: 4 - Strongly Agree to 1 - Strongly Disagree (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses",
       caption = "Source: TOPC Cohort 3 Survey (2023)") +
  theme_minimal() +
  theme(legend.position = "bottom",
        legend.title = element_blank(),
        panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0)) +
  guides(fill = guide_legend(reverse = TRUE, nrow = 1, byrow = TRUE))

print(q6_post_cross_tab_city_plot)

Code
ggsave("plots/q6_post_cross_tab_city_plot.png", q6_post_cross_tab_city_plot)

Q15. I learned new skills in collaborating with a community organization to research a problem and co-design a solution.

Code
# Single-variable frequency plot
q15_frequency <- svytable(~q15, design = design)

all_levels_df <- data.frame(q15 = factor(1:4, levels = 1:4), Freq = integer(4))

q15_frequency_df <- merge(all_levels_df, as.data.frame(q15_frequency), by = "q15", all.x = TRUE)
q15_frequency_df$Freq <- rowSums(q15_frequency_df[, c("Freq.x", "Freq.y")], na.rm = TRUE)

q15_post_frequency_plot <- ggplot(q15_frequency_df, aes(x = q15, y = Freq)) +
  geom_bar(stat = "identity", fill = "#041e42", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) + 
  labs(title = "Q15. I learned new skills in collaborating with a community organization 
to research a problem and co-design a solution.",
       subtitle = paste("Rating Scale: 4 - Strongly Agree to 1 - Strongly Disagree (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses",
       caption = "Source: TOPC Cohort 3 Survey (2023)") +
  theme_minimal() + 
  theme(panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0))

print(q15_post_frequency_plot)

Code
ggsave("plots/q15_post_frequency_plot.png", q15_post_frequency_plot)

# Cross-tabulation with cities
q15_cross_tab_city <- svytable(~q15 + city_mapped, design = design)

q15_levels_ordered <- as.factor(as.data.frame(q15_cross_tab_city)$q15)
q15_levels_ordered <- factor(q15_levels_ordered, levels = c("1", "2", "3", "4"))

q15_cross_tab_city_df <- as.data.frame(q15_cross_tab_city)
q15_cross_tab_city_df$q15 <- factor(q15_cross_tab_city_df$q15, levels = c("1", "2", "3", "4"))

q15_post_cross_tab_city_plot <- ggplot(q15_cross_tab_city_df, aes(x = city_mapped, y = Freq, fill = q15)) +
  geom_bar(stat = "identity", position = "stack", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) +
  scale_fill_manual(values = c("4" = "#041e42", "3" = "#6eaddc", "2" = "#da291c", "1" = "#1B786E"),
          drop=FALSE) +  
  labs(title = "Q15. I learned new skills in collaborating with a community organization 
to research a problem and co-design a solution.",
       subtitle = paste("Rating Scale: 4 - Strongly Agree to 1 - Strongly Disagree (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses",
       caption = "Source: TOPC Cohort 3 Survey (2023)") +
  theme_minimal() +
  theme(legend.position = "bottom",
        legend.title = element_blank(),
        panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0)) +
  guides(fill = guide_legend(reverse = TRUE, nrow = 1, byrow = TRUE))

print(q15_post_cross_tab_city_plot)

Code
ggsave("plots/q15_post_cross_tab_city_plot.png", q15_post_cross_tab_city_plot)

Q16. I learned new skills in building consensus and aligning on long-term plans with internal stakeholders.

Code
# Single-variable frequency plot
q16_frequency <- svytable(~q16, design = design)

all_levels_df <- data.frame(q16 = factor(1:4, levels = 1:4), Freq = integer(4))

q16_frequency_df <- merge(all_levels_df, as.data.frame(q16_frequency), by = "q16", all.x = TRUE)
q16_frequency_df$Freq <- rowSums(q16_frequency_df[, c("Freq.x", "Freq.y")], na.rm = TRUE)

q16_post_frequency_plot <- ggplot(q16_frequency_df, aes(x = q16, y = Freq)) +
  geom_bar(stat = "identity", fill = "#041e42", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) + 
  labs(title = "Q16. I learned new skills in building consensus and aligning 
on long-term plans with internal stakeholders.",
       subtitle = paste("Rating Scale: 4 - Strongly Agree to 1 - Strongly Disagree (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses",
       caption = "Source: TOPC Cohort 3 Survey (2023)") +
  theme_minimal() + 
  theme(panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0))

print(q16_post_frequency_plot)

Code
ggsave("plots/q16_post_frequency_plot.png", q16_post_frequency_plot)

# Cross-tabulation with cities
q16_cross_tab_city <- svytable(~q16 + city_mapped, design = design)

q16_levels_ordered <- as.factor(as.data.frame(q16_cross_tab_city)$q16)
q16_levels_ordered <- factor(q16_levels_ordered, levels = c("1", "2", "3", "4"))

q16_cross_tab_city_df <- as.data.frame(q16_cross_tab_city)
q16_cross_tab_city_df$q16 <- factor(q16_cross_tab_city_df$q16, levels = c("1", "2", "3", "4"))

q16_post_cross_tab_city_plot <- ggplot(q16_cross_tab_city_df, aes(x = city_mapped, y = Freq, fill = q16)) +
  geom_bar(stat = "identity", position = "stack", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) +
  scale_fill_manual(values = c("4" = "#041e42", "3" = "#6eaddc", "2" = "#da291c", "1" = "#1B786E"),
          drop=FALSE) +  
  labs(title = "Q16. I learned new skills in building consensus and aligning 
on long-term plans with internal stakeholders.",
       subtitle = paste("Rating Scale: 4 - Strongly Agree to 1 - Strongly Disagree (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses",
       caption = "Source: TOPC Cohort 3 Survey (2023)") +
  theme_minimal() +
  theme(legend.position = "bottom",
        legend.title = element_blank(),
        panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0)) +
  guides(fill = guide_legend(reverse = TRUE, nrow = 1, byrow = TRUE))

print(q16_post_cross_tab_city_plot)

Code
ggsave("plots/q16_post_cross_tab_city_plot.png", q16_post_cross_tab_city_plot)

Q9. I learned different strategies to brainstorm many ideas based on the insights taken from the community research.

Code
# Single-variable frequency plot
q9_frequency <- svytable(~q9, design = design)

q9_frequency <- svytable(~q9, design = design)

all_levels_df <- data.frame(q9 = factor(1:4, levels = 1:4), Freq = integer(4))

q9_frequency_df <- merge(all_levels_df, as.data.frame(q9_frequency), by = "q9", all.x = TRUE)
q9_frequency_df$Freq <- rowSums(q9_frequency_df[, c("Freq.x", "Freq.y")], na.rm = TRUE)

q9_post_frequency_plot <- ggplot(q9_frequency_df, aes(x = q9, y = Freq)) +
  geom_bar(stat = "identity", fill = "#041e42", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) + 
  labs(title = "Q9. I learned different strategies to brainstorm many ideas
based on the insights taken from the community research.",
       subtitle = paste("Rating Scale: 4 - Strongly Agree to 1 - Strongly Disagree (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses",
       caption = "Source: TOPC Cohort 3 Survey (2023)") +
  theme_minimal() + 
  theme(panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0))

print(q9_post_frequency_plot)

Code
ggsave("plots/q9_post_frequency_plot.png", q9_post_frequency_plot)

# Cross-tabulation with cities
q9_cross_tab_city <- svytable(~q9 + city_mapped, design = design)

q9_levels_ordered <- as.factor(as.data.frame(q9_cross_tab_city)$q9)
q9_levels_ordered <- factor(q9_levels_ordered, levels = c("1", "2", "3", "4"))

q9_cross_tab_city_df <- as.data.frame(q9_cross_tab_city)
q9_cross_tab_city_df$q9 <- factor(q9_cross_tab_city_df$q9, levels = c("1", "2", "3", "4"))

q9_post_cross_tab_city_plot <- ggplot(q9_cross_tab_city_df, aes(x = city_mapped, y = Freq, fill = q9)) +
  geom_bar(stat = "identity", position = "stack", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) +
  scale_fill_manual(values = c("4" = "#041e42", "3" = "#6eaddc", "2" = "#da291c", "1" = "#1B786E"),
          drop=FALSE) +   
  labs(title = "Q9. I learned different strategies to brainstorm many ideas
based on the insights taken from the community research.",
       subtitle = paste("Rating Scale: 4 - Strongly Agree to 1 - Strongly Disagree (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses",
       caption = "Source: TOPC Cohort 3 Survey (2023)") +
  theme_minimal() +
  theme(legend.position = "bottom",
        legend.title = element_blank(),
        panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0)) +
  guides(fill = guide_legend(reverse = TRUE, nrow = 1, byrow = TRUE))

print(q9_post_cross_tab_city_plot)

Code
ggsave("plots/q9_post_cross_tab_city_plot.png", q9_post_cross_tab_city_plot)

Q10. I learned new skills in outlining and prioritizing requirements for the development of a digital product.

Code
# Single-variable frequency plot
q10_frequency <- svytable(~q10, design = design)

q10_frequency <- svytable(~q10, design = design)

all_levels_df <- data.frame(q10 = factor(1:4, levels = 1:4), Freq = integer(4))

q10_frequency_df <- merge(all_levels_df, as.data.frame(q10_frequency), by = "q10", all.x = TRUE)
q10_frequency_df$Freq <- rowSums(q10_frequency_df[, c("Freq.x", "Freq.y")], na.rm = TRUE)

q10_post_frequency_plot <- ggplot(q10_frequency_df, aes(x = q10, y = Freq)) +
  geom_bar(stat = "identity", fill = "#041e42", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) + 
  labs(title = "Q10. I learned new skills in outlining and prioritizing requirements
for the development of a digital product.",
       subtitle = paste("Rating Scale: 4 - Strongly Agree to 1 - Strongly Disagree (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses",
       caption = "Source: TOPC Cohort 3 Survey (2023)") +
  theme_minimal() + 
  theme(panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0))

print(q10_post_frequency_plot)

Code
ggsave("plots/q10_post_frequency_plot.png", q10_post_frequency_plot)

# Cross-tabulation with cities
q10_cross_tab_city <- svytable(~q10 + city_mapped, design = design)

q10_levels_ordered <- as.factor(as.data.frame(q10_cross_tab_city)$q10)
q10_levels_ordered <- factor(q10_levels_ordered, levels = c("1", "2", "3", "4"))

q10_cross_tab_city_df <- as.data.frame(q10_cross_tab_city)
q10_cross_tab_city_df$q10 <- factor(q10_cross_tab_city_df$q10, levels = c("1", "2", "3", "4"))

q10_post_cross_tab_city_plot <- ggplot(q10_cross_tab_city_df, aes(x = city_mapped, y = Freq, fill = q10)) +
  geom_bar(stat = "identity", position = "stack", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) +
  scale_fill_manual(values = c("4" = "#041e42", "3" = "#6eaddc", "2" = "#da291c", "1" = "#1B786E"),
          drop=FALSE) +   
  labs(title = "Q10. I learned new skills in outlining and prioritizing requirements 
for the development of a digital product.",
       subtitle = paste("Rating Scale: 4 - Strongly Agree to 1 - Strongly Disagree (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses",
       caption = "Source: TOPC Cohort 3 Survey (2023)") +
  theme_minimal() +
  theme(legend.position = "bottom",
        legend.title = element_blank(),
        panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0)) +
  guides(fill = guide_legend(reverse = TRUE, nrow = 1, byrow = TRUE))

print(q10_post_cross_tab_city_plot)

Code
ggsave("plots/q10_post_cross_tab_city_plot.png", q10_post_cross_tab_city_plot)

Q11. I learned new skills in identifying and evaluating data to support the digital solution.

Code
# Single-variable frequency plot
q11_frequency <- svytable(~q11, design = design)

all_levels_df <- data.frame(q11 = factor(1:4, levels = 1:4), Freq = integer(4))

q11_frequency_df <- merge(all_levels_df, as.data.frame(q11_frequency), by = "q11", all.x = TRUE)
q11_frequency_df$Freq <- rowSums(q11_frequency_df[, c("Freq.x", "Freq.y")], na.rm = TRUE)

q11_post_frequency_plot <- ggplot(q11_frequency_df, aes(x = q11, y = Freq)) +
  geom_bar(stat = "identity", fill = "#041e42", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) + 
  labs(title = "Q11. I learned new skills in identifying and evaluating 
data to support the digital solution.",
       subtitle = paste("Rating Scale: 4 - Strongly Agree to 1 - Strongly Disagree (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses",
       caption = "Source: TOPC Cohort 3 Survey (2023)") +
  theme_minimal() + 
  theme(panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0))

print(q11_post_frequency_plot)

Code
ggsave("plots/q11_post_frequency_plot.png", q11_post_frequency_plot)

# Cross-tabulation with cities
q11_cross_tab_city <- svytable(~q11 + city_mapped, design = design)

q11_levels_ordered <- as.factor(as.data.frame(q11_cross_tab_city)$q11)
q11_levels_ordered <- factor(q11_levels_ordered, levels = c("1", "2", "3", "4"))

q11_cross_tab_city_df <- as.data.frame(q11_cross_tab_city)
q11_cross_tab_city_df$q11 <- factor(q11_cross_tab_city_df$q11, levels = c("1", "2", "3", "4"))

q11_post_cross_tab_city_plot <- ggplot(q11_cross_tab_city_df, aes(x = city_mapped, y = Freq, fill = q11)) +
  geom_bar(stat = "identity", position = "stack", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) +
  scale_fill_manual(values = c("4" = "#041e42", "3" = "#6eaddc", "2" = "#da291c", "1" = "#1B786E"),
          drop=FALSE) +   
  labs(title = "Q11. I learned new skills in identifying and evaluating 
data to support the digital solution.",
       subtitle = paste("Rating Scale: 4 - Strongly Agree to 1 - Strongly Disagree (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses",
       caption = "Source: TOPC Cohort 3 Survey (2023)") +
  theme_minimal() +
  theme(legend.position = "bottom",
        legend.title = element_blank(),
        panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0)) +
  guides(fill = guide_legend(reverse = TRUE, nrow = 1, byrow = TRUE))

print(q11_post_cross_tab_city_plot)

Code
ggsave("plots/q11_post_cross_tab_city_plot.png", q11_post_cross_tab_city_plot)

Q12. I learned new skills for managing the development of a digital product.

Code
# Single-variable frequency plot
q12_frequency <- svytable(~q12, design = design)

q12_frequency <- svytable(~q12, design = design)

all_levels_df <- data.frame(q12 = factor(1:4, levels = 1:4), Freq = integer(4))

q12_frequency_df <- merge(all_levels_df, as.data.frame(q12_frequency), by = "q12", all.x = TRUE)
q12_frequency_df$Freq <- rowSums(q12_frequency_df[, c("Freq.x", "Freq.y")], na.rm = TRUE)

q12_post_frequency_plot <- ggplot(q12_frequency_df, aes(x = q12, y = Freq)) +
  geom_bar(stat = "identity", fill = "#041e42", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) + 
  labs(title = "Q12. I learned new skills for managing the development 
of a digital product.",
       subtitle = paste("Rating Scale: 4 - Strongly Agree to 1 - Strongly Disagree (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses",
       caption = "Source: TOPC Cohort 3 Survey (2023)") +
  theme_minimal() + 
  theme(panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0))

print(q12_post_frequency_plot)

Code
ggsave("plots/q12_post_frequency_plot.png", q12_post_frequency_plot)

# Cross-tabulation with cities
q12_cross_tab_city <- svytable(~q12 + city_mapped, design = design)

q12_levels_ordered <- as.factor(as.data.frame(q12_cross_tab_city)$q12)
q12_levels_ordered <- factor(q12_levels_ordered, levels = c("1", "2", "3", "4"))

q12_cross_tab_city_df <- as.data.frame(q12_cross_tab_city)
q12_cross_tab_city_df$q12 <- factor(q12_cross_tab_city_df$q12, levels = c("1", "2", "3", "4"))

q12_post_cross_tab_city_plot <- ggplot(q12_cross_tab_city_df, aes(x = city_mapped, y = Freq, fill = q12)) +
  geom_bar(stat = "identity", position = "stack", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) +
  scale_fill_manual(values = c("4" = "#041e42", "3" = "#6eaddc", "2" = "#da291c", "1" = "#1B786E"),
          drop=FALSE) +   
  labs(title = "Q12. I learned new skills for managing the development 
of a digital product.",
       subtitle = paste("Rating Scale: 4 - Strongly Agree to 1 - Strongly Disagree (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses",
       caption = "Source: TOPC Cohort 3 Survey (2023)") +
  theme_minimal() +
  theme(legend.position = "bottom",
        legend.title = element_blank(),
        panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0)) +
  guides(fill = guide_legend(reverse = TRUE, nrow = 1, byrow = TRUE))

print(q12_post_cross_tab_city_plot)

Code
ggsave("plots/q12_post_cross_tab_city_plot.png", q12_post_cross_tab_city_plot)

Q13. I learned new skills for creating a product sustainability plan to ensure that product is improved and maintained.

Code
# Single-variable frequency plot
q13_frequency <- svytable(~q13, design = design)

q13_frequency <- svytable(~q13, design = design)

all_levels_df <- data.frame(q13 = factor(1:4, levels = 1:4), Freq = integer(4))

q13_frequency_df <- merge(all_levels_df, as.data.frame(q13_frequency), by = "q13", all.x = TRUE)
q13_frequency_df$Freq <- rowSums(q13_frequency_df[, c("Freq.x", "Freq.y")], na.rm = TRUE)

q13_post_frequency_plot <- ggplot(q13_frequency_df, aes(x = q13, y = Freq)) +
  geom_bar(stat = "identity", fill = "#041e42", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) + 
  labs(title = "Q13. I learned new skills for creating a product sustainability 
plan to ensure that product is improved and maintained.",
       subtitle = paste("Rating Scale: 4 - Strongly Agree to 1 - Strongly Disagree (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses",
       caption = "Source: TOPC Cohort 3 Survey (2023)") +
  theme_minimal() + 
  theme(panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0))

print(q13_post_frequency_plot)

Code
ggsave("plots/q13_post_frequency_plot.png", q13_post_frequency_plot)

# Cross-tabulation with cities
q13_cross_tab_city <- svytable(~q13 + city_mapped, design = design)

q13_levels_ordered <- as.factor(as.data.frame(q13_cross_tab_city)$q13)
q13_levels_ordered <- factor(q13_levels_ordered, levels = c("1", "2", "3", "4"))

q13_cross_tab_city_df <- as.data.frame(q13_cross_tab_city)
q13_cross_tab_city_df$q13 <- factor(q13_cross_tab_city_df$q13, levels = c("1", "2", "3", "4"))

q13_post_cross_tab_city_plot <- ggplot(q13_cross_tab_city_df, aes(x = city_mapped, y = Freq, fill = q13)) +
  geom_bar(stat = "identity", position = "stack", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) +
  scale_fill_manual(values = c("4" = "#041e42", "3" = "#6eaddc", "2" = "#da291c", "1" = "#1B786E"),
          drop=FALSE) +   
  labs(title = "Q13. I learned new skills for creating a product sustainability 
plan to ensure that product is improved and maintained.",
       subtitle = paste("Rating Scale: 4 - Strongly Agree to 1 - Strongly Disagree (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses",
       caption = "Source: TOPC Cohort 3 Survey (2023)") +
  theme_minimal() +
  theme(legend.position = "bottom",
        legend.title = element_blank(),
        panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0)) +
  guides(fill = guide_legend(reverse = TRUE, nrow = 1, byrow = TRUE))

print(q13_post_cross_tab_city_plot)

Code
ggsave("plots/q13_post_cross_tab_city_plot.png", q13_post_cross_tab_city_plot)

Goal 2: Participant Confidence and Competence

Q14. I have the skills and support to be able to innovate in my day-to-day work.

Code
# Single-variable frequency plot
q14_frequency <- svytable(~q14, design = design)

q14_frequency <- svytable(~q14, design = design)

all_levels_df <- data.frame(q14 = factor(1:4, levels = 1:4), Freq = integer(4))

q14_frequency_df <- merge(all_levels_df, as.data.frame(q14_frequency), by = "q14", all.x = TRUE)
q14_frequency_df$Freq <- rowSums(q14_frequency_df[, c("Freq.x", "Freq.y")], na.rm = TRUE)

q14_post_frequency_plot <- ggplot(q14_frequency_df, aes(x = q14, y = Freq)) +
  geom_bar(stat = "identity", fill = "#041e42", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) + 
  labs(title = "Most respondents agree they have the skills and support
to innovate in their everyday work.",
       subtitle = paste("Rating Scale: 4 - Strongly Agree to 1 - Strongly Disagree (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses",
       caption = "Source: TOPC Cohort 3 Survey (2023)") +
  theme_minimal() + 
  theme(panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0))

print(q14_post_frequency_plot)

Code
ggsave("plots/q14_post_frequency_plot.png", q14_post_frequency_plot)

# Cross-tabulation with cities
q14_cross_tab_city <- svytable(~q14 + city_mapped, design = design)

q14_levels_ordered <- as.factor(as.data.frame(q14_cross_tab_city)$q14)
q14_levels_ordered <- factor(q14_levels_ordered, levels = c("1", "2", "3", "4"))

q14_cross_tab_city_df <- as.data.frame(q14_cross_tab_city)
q14_cross_tab_city_df$q14 <- factor(q14_cross_tab_city_df$q14, levels = c("1", "2", "3", "4"))

q14_post_cross_tab_city_plot <- ggplot(q14_cross_tab_city_df, aes(x = city_mapped, y = Freq, fill = q14)) +
  geom_bar(stat = "identity", position = "stack", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) +
  scale_fill_manual(values = c("4" = "#041e42", "3" = "#6eaddc", "2" = "#da291c", "1" = "#1B786E"),
          drop=FALSE) +   
  labs(title = "Majority agree that they have the skills and support to innovate
in their everyday work, but some disagree in Detroit.",
       subtitle = paste("Rating Scale: 4 - Strongly Agree to 1 - Strongly Disagree (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses",
       caption = "Source: TOPC Cohort 3 Survey (2023)") +
  theme_minimal() +
  theme(legend.position = "bottom",
        legend.title = element_blank(),
        panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0)) +
  guides(fill = guide_legend(reverse = TRUE, nrow = 1, byrow = TRUE))

print(q14_post_cross_tab_city_plot)

Code
ggsave("plots/q14_post_cross_tab_city_plot.png", q14_post_cross_tab_city_plot)

Q17. I feel confident working with technical partners to design a tool and advance the tool’s development.

Code
# Single-variable frequency plot
q17_frequency <- svytable(~q17, design = design)

q17_frequency <- svytable(~q17, design = design)

all_levels_df <- data.frame(q17 = factor(1:4, levels = 1:4), Freq = integer(4))

q17_frequency_df <- merge(all_levels_df, as.data.frame(q17_frequency), by = "q17", all.x = TRUE)
q17_frequency_df$Freq <- rowSums(q17_frequency_df[, c("Freq.x", "Freq.y")], na.rm = TRUE)

q17_post_frequency_plot <- ggplot(q17_frequency_df, aes(x = q17, y = Freq)) +
  geom_bar(stat = "identity", fill = "#041e42", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) + 
  labs(title = "Q17. I feel confident working with technical partners to design a tool 
and advance the tool's development.",
       subtitle = paste("Rating Scale: 4 - Strongly Agree to 1 - Strongly Disagree (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses",
       caption = "Source: TOPC Cohort 3 Survey (2023)") +
  theme_minimal() + 
  theme(panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0))

print(q17_post_frequency_plot)

Code
ggsave("plots/q17_post_frequency_plot.png", q17_post_frequency_plot)

# Cross-tabulation with cities
q17_cross_tab_city <- svytable(~q17 + city_mapped, design = design)

q17_levels_ordered <- as.factor(as.data.frame(q17_cross_tab_city)$q17)
q17_levels_ordered <- factor(q17_levels_ordered, levels = c("1", "2", "3", "4"))

q17_cross_tab_city_df <- as.data.frame(q17_cross_tab_city)
q17_cross_tab_city_df$q17 <- factor(q17_cross_tab_city_df$q17, levels = c("1", "2", "3", "4"))

q17_post_cross_tab_city_plot <- ggplot(q17_cross_tab_city_df, aes(x = city_mapped, y = Freq, fill = q17)) +
  geom_bar(stat = "identity", position = "stack", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) +
  scale_fill_manual(values = c("4" = "#041e42", "3" = "#6eaddc", "2" = "#da291c", "1" = "#1B786E"),
          drop=FALSE) +   
  labs(title = "Q17. I feel confident working with technical partners to design a tool 
and advance the tool's development.",
       subtitle = paste("Rating Scale: 4 - Strongly Agree to 1 - Strongly Disagree (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses",
       caption = "Source: TOPC Cohort 3 Survey (2023)") +
  theme_minimal() +
  theme(legend.position = "bottom",
        legend.title = element_blank(),
        panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0)) +
  guides(fill = guide_legend(reverse = TRUE, nrow = 1, byrow = TRUE))

print(q17_post_cross_tab_city_plot)

Code
ggsave("plots/q17_post_cross_tab_city_plot.png", q17_post_cross_tab_city_plot)

Goal 3: Participant Recognition and Application of Methods

Q20. I am applying the skills I’m learning in this program to my day-to-day work.

Code
# Single-variable frequency plot
q20_frequency <- svytable(~q20, design = design)

q20_frequency <- svytable(~q20, design = design)

all_levels_df <- data.frame(q20 = factor(1:4, levels = 1:4), Freq = integer(4))

q20_frequency_df <- merge(all_levels_df, as.data.frame(q20_frequency), by = "q20", all.x = TRUE)
q20_frequency_df$Freq <- rowSums(q20_frequency_df[, c("Freq.x", "Freq.y")], na.rm = TRUE)

q20_post_frequency_plot <- ggplot(q20_frequency_df, aes(x = q20, y = Freq)) +
  geom_bar(stat = "identity", fill = "#041e42", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) + 
  labs(title = "Most respondents agree they are applying the skills they have 
learned from the program in their everyday work.",
       subtitle = paste("Rating Scale: 4 - Strongly Agree to 1 - Strongly Disagree (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses",
       caption = "Source: TOPC Cohort 3 Survey (2023)") +
  theme_minimal() + 
  theme(panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0))

print(q20_post_frequency_plot)

Code
ggsave("plots/q20_post_frequency_plot.png", q20_post_frequency_plot)

# Cross-tabulation with cities
q20_cross_tab_city <- svytable(~q20 + city_mapped, design = design)

q20_levels_ordered <- as.factor(as.data.frame(q20_cross_tab_city)$q20)
q20_levels_ordered <- factor(q20_levels_ordered, levels = c("1", "2", "3", "4"))

q20_cross_tab_city_df <- as.data.frame(q20_cross_tab_city)
q20_cross_tab_city_df$q20 <- factor(q20_cross_tab_city_df$q20, levels = c("1", "2", "3", "4"))

q20_post_cross_tab_city_plot <- ggplot(q20_cross_tab_city_df, aes(x = city_mapped, y = Freq, fill = q20)) +
  geom_bar(stat = "identity", position = "stack", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) +
  scale_fill_manual(values = c("4" = "#041e42", "3" = "#6eaddc", "2" = "#da291c", "1" = "#1B786E"),
          drop=FALSE) +   
  labs(title = "Majority agree that they apply the skills they have learned from the 
program, with Miami strongly agreeing the most.",
       subtitle = paste("Rating Scale: 4 - Strongly Agree to 1 - Strongly Disagree (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses",
       caption = "Source: TOPC Cohort 3 Survey (2023)") +
  theme_minimal() +
  theme(legend.position = "bottom",
        legend.title = element_blank(),
        panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0)) +
  guides(fill = guide_legend(reverse = TRUE, nrow = 1, byrow = TRUE))

print(q20_post_cross_tab_city_plot)

Code
ggsave("plots/q20_post_cross_tab_city_plot.png", q20_post_cross_tab_city_plot)

Q7. My team has defined a role for residents or the community in designing services moving forward.

Code
# Single-variable frequency plot
q7_frequency <- svytable(~q7, design = design)

q7_frequency <- svytable(~q7, design = design)

all_levels_df <- data.frame(q7 = factor(1:4, levels = 1:4), Freq = integer(4))

q7_frequency_df <- merge(all_levels_df, as.data.frame(q7_frequency), by = "q7", all.x = TRUE)
q7_frequency_df$Freq <- rowSums(q7_frequency_df[, c("Freq.x", "Freq.y")], na.rm = TRUE)

q7_post_frequency_plot <- ggplot(q7_frequency_df, aes(x = q7, y = Freq)) +
  geom_bar(stat = "identity", fill = "#041e42", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) + 
  labs(title = "Q7. My team has defined a role for residents or the community 
in designing services moving forward.",
       subtitle = paste("Rating Scale: 4 - Strongly Agree to 1 - Strongly Disagree (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses",
       caption = "Source: TOPC Cohort 3 Survey (2023)") +
  theme_minimal() + 
  theme(panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0))

print(q7_post_frequency_plot)

Code
ggsave("plots/q7_post_frequency_plot.png", q7_post_frequency_plot)

# Cross-tabulation with cities
q7_cross_tab_city <- svytable(~q7 + city_mapped, design = design)

q7_levels_ordered <- as.factor(as.data.frame(q7_cross_tab_city)$q7)
q7_levels_ordered <- factor(q7_levels_ordered, levels = c("1", "2", "3", "4"))

q7_cross_tab_city_df <- as.data.frame(q7_cross_tab_city)
q7_cross_tab_city_df$q7 <- factor(q7_cross_tab_city_df$q7, levels = c("1", "2", "3", "4"))

q7_post_cross_tab_city_plot <- ggplot(q7_cross_tab_city_df, aes(x = city_mapped, y = Freq, fill = q7)) +
  geom_bar(stat = "identity", position = "stack", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) +
  scale_fill_manual(values = c("4" = "#041e42", "3" = "#6eaddc", "2" = "#da291c", "1" = "#1B786E"),
          drop=FALSE) +   
  labs(title = "Q7. My team has defined a role for residents or the community 
in designing services moving forward.",
       subtitle = paste("Rating Scale: 4 - Strongly Agree to 1 - Strongly Disagree (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses",
       caption = "Source: TOPC Cohort 3 Survey (2023)") +
  theme_minimal() +
  theme(legend.position = "bottom",
        legend.title = element_blank(),
        panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0)) +
  guides(fill = guide_legend(reverse = TRUE, nrow = 1, byrow = TRUE))

print(q7_post_cross_tab_city_plot)

Code
ggsave("plots/q7_post_cross_tab_city_plot.png", q7_post_cross_tab_city_plot)

Goal 4: Participant Satisfaction and Intention to Action

Q21. I would recommend this program to my peers.

Code
# Single-variable frequency plot
q21_frequency <- svytable(~q21, design = design)

q21_frequency <- svytable(~q21, design = design)

all_levels_df <- data.frame(q21 = factor(1:4, levels = 1:4), Freq = integer(4))

q21_frequency_df <- merge(all_levels_df, as.data.frame(q21_frequency), by = "q21", all.x = TRUE)
q21_frequency_df$Freq <- rowSums(q21_frequency_df[, c("Freq.x", "Freq.y")], na.rm = TRUE)

q21_post_frequency_plot <- ggplot(q21_frequency_df, aes(x = q21, y = Freq)) +
  geom_bar(stat = "identity", fill = "#041e42", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) + 
  labs(title = "Q21. I would recommend this program to my peers.",
       subtitle = paste("Rating Scale: 4 - Strongly Agree to 1 - Strongly Disagree (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses",
       caption = "Source: TOPC Cohort 3 Survey (2023)") +
  theme_minimal() + 
  theme(panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0))

print(q21_post_frequency_plot)

Code
ggsave("plots/q21_post_frequency_plot.png", q21_post_frequency_plot)

# Cross-tabulation with cities
q21_cross_tab_city <- svytable(~q21 + city_mapped, design = design)

q21_levels_ordered <- as.factor(as.data.frame(q21_cross_tab_city)$q21)
q21_levels_ordered <- factor(q21_levels_ordered, levels = c("1", "2", "3", "4"))

q21_cross_tab_city_df <- as.data.frame(q21_cross_tab_city)
q21_cross_tab_city_df$q21 <- factor(q21_cross_tab_city_df$q21, levels = c("1", "2", "3", "4"))

q21_post_cross_tab_city_plot <- ggplot(q21_cross_tab_city_df, aes(x = city_mapped, y = Freq, fill = q21)) +
  geom_bar(stat = "identity", position = "stack", width = 0.7) +
  coord_flip() +
  expand_limits(y = c(0, total_sample)) +
  scale_fill_manual(values = c("4" = "#041e42", "3" = "#6eaddc", "2" = "#da291c", "1" = "#1B786E"),
          drop=FALSE) +   
  labs(title = "Q21. I would recommend this program to my peers.",
       subtitle = paste("Rating Scale: 4 - Strongly Agree to 1 - Strongly Disagree (n =", total_sample, ")"),
       x = "",
       y = "Number of Responses",
       caption = "Source: TOPC Cohort 3 Survey (2023)") +
  theme_minimal() +
  theme(legend.position = "bottom",
        legend.title = element_blank(),
        panel.grid.major.y = element_blank(),
        panel.grid.minor.y = element_blank(),
        plot.title = element_text(face = "bold"),
        plot.caption = element_text(hjust = 0)) +
  guides(fill = guide_legend(reverse = TRUE, nrow = 1, byrow = TRUE))

print(q21_post_cross_tab_city_plot)

Code
ggsave("plots/q21_post_cross_tab_city_plot.png", q21_post_cross_tab_city_plot)